﻿using Microsoft.Owin.Hosting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sustainalytics.AdminInterface.Service
{
    public static class ProgramConsole
    {
        public static void Start()
        {
            try
            {
                var url = HostConfig.GetHostUrl();
                using (WebApp.Start<Startup>(url))
                {
                    Console.WriteLine("Started on: " + url);
                    Console.ReadKey();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                Console.ReadKey();
            }
        }
    }
}
